import Vue from 'vue'
import VueRouter from 'vue-router'
//import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: 'home',
        meta: {
            title: '首页',
            requiresAuth: true,
            keepAlive:true
        },
        component: () =>import('../views/Home.vue')
    },
    {
        path: '/particulars',
        name: 'particulars',
        meta: {
            title: '详情',
            requiresAuth: true,
            keepAlive:false
        },
        component: () =>
            import('../views/particulars.vue')
    },
    {
        path: '/publisharticle',
        name: 'publisharticle',
        meta: {
            title: '发布文章',
            requiresAuth: true,
            keepAlive:false
        },
        component: () =>
            import('../views/publisharticle.vue')
    }
]

const router = new VueRouter({
    routes
})

export default router